package com.example.strategy.strategy2.rule.impl;

import com.example.strategy.strategy2.pojo.RuleDto;
import com.example.strategy.strategy2.rule.AbstractRule;

public class SubjectRule extends AbstractRule {

    @Override
    public boolean execute(RuleDto dto) {
        System.out.println("AddressRule invoke!");
        if (dto.getSubject().startsWith("数学")) {
            return true;
        }
        return false;
    }
}